<?php
/*
+--------------------------------------------------------------------------
|   Anwsion [#RELEASE_VERSION#]
|   ========================================
|   by Tatfook Network Team
|   (c) 2011 - 2012 Anwsion Software
|   http://www.anwsion.com
|   ========================================
|   Support: zhengqiang@gmail.com
|   
+---------------------------------------------------------------------------
*/

class c_main_class extends AWS_CONTROLLER
{
	public function get_access_rule()
	{
		$rule_action["rule_type"] = 'black';
		
		return $rule_action;
	}
	
	public function setup()
	{
		HTTP::no_cache_header();
		
		ZCACHE::$cache_open = TRUE;
	}
	
	public function index_action()
	{
		
	}
	
	public function run_action()
	{
		header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');             // Date in the past
		header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified
		header('Cache-Control: no-cache, must-revalidate');           // HTTP/1.1
		header('Pragma: no-cache');                                   // HTTP/1.0
		
		$this->model('crond')->start($this->user_id);
		
		if (AWS_APP::config()->get('system')->debug)
		{
			TPL::output('global/debuger.tpl.htm');
		}
		else
		{
			/*header("Content-disposition: inline; filename=clear.gif");
			header('Content-transfer-encoding: binary');
			header("Content-Length: " . strlen('R0lGODlhAQABAIAAAMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=='));
			header('Content-type: image/gif');
			echo base64_decode('R0lGODlhAQABAIAAAMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==');*/
		}
		
		die;
	}
}